<p>This rule applies whenever an <code>if</code> statement is followed by one or more <code>else if</code> statements; the final <code>else if</code>
should be followed by an <code>else</code> statement.</p>
<p>The requirement for a final <code>else</code> statement is defensive programming.</p>
<p>The <code>else</code> statement should either take appropriate action or contain a suitable comment as to why no action is taken. This is
consistent with the requirement to have a final <code>default</code> clause in a <code>switch</code> statement.</p>
<h2>Noncompliant Code Example</h2>
<pre>
if (x == 0) {
  doSomething();
} else if (x == 1) {
  doSomethingElse();
}
</pre>
<h2>Compliant Solution</h2>
<pre>
if (x == 0) {
  doSomething();
} else if (x == 1) {
  doSomethingElse();
} else {
  throw new IllegalStateException();
}
</pre>
<h2>See</h2>
<ul>
  <li> <a href="https://wiki.sei.cmu.edu/confluence/x/RtYxBQ">CERT, MSC01-C.</a> - Strive for logical completeness </li>
  <li> <a href="https://wiki.sei.cmu.edu/confluence/x/jzZGBQ">CERT, MSC57-J.</a> - Strive for logical completeness </li>
</ul>

